/**
 * @addtogroup FPDFAPI
 * @{
 */

/**
 * @file
 * @brief XFA Support.
 */

#ifndef _FPDF_XFA_H_
#define _FPDF_XFA_H_

#ifndef _FXM_OPENSOURCE_

class CXML_Element;
class CPDF_Stream;

/** @brief XFA form. */
class CXFA_Form : public CFX_Object
{
public:
	/** Default constructor. */
	CXFA_Form();
	/** The destructor. */
	~CXFA_Form();

	/**
	 * Load from stream or streams comprising the XML data package.
	 *
	 * @param[in] pArray			the input stream or streams comprising the XML data package.
	 * @return Non-zero means success, otherwise failure.
	 */
	FX_BOOL			LoadForm(CPDF_Array* pArray);

	/**
	 * Get a field value.
	 *
	 * @param[in] FieldName			The input field name.
	 * @return The field value.
	 */
	CFX_WideString	GetFieldValue(const CFX_WideString& FieldName);
	/**
	 * Set a field value.
	 *
	 * @param[in] FieldName			The field name.
	 * @param[in] value				The field value.
	 */
	void			SetFieldValue(const CFX_WideString& FieldName, const CFX_WideString& value);

protected:
	/** The data set. The only one we handle right now. */
	CXML_Element*	m_pDataSet;
	/** The data set stream. */
	CPDF_Stream*	m_pDSStream;
};

#endif //_FXM_OPENSOURCE_

#endif //_FPDF_XFA_H_

/** @} */

